import { createRouter, createWebHashHistory } from 'vue-router'

import login from '../views/login.vue'
import index from '../views/index.vue'
import main1 from '../components/main1.vue'
import main2 from '../components/main2.vue'
import register from '../components/register.vue'

const routes = [
    { path: "/", component: login },
    {
        path: '/index', component: index,
        children: [
            { path: '', component: main1, },
            { path: 'main2', component: main2 }
        ]
    },
    {
        path: '/register', component: register
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router;